package com.songshuai.webapi.baseapi.client;
import com.songshuai.webapi.baseapi.client.hystrix.UserServiceHystrix;
import com.songshuai.webapi.baseapi.dto.request.UserDto;
import com.songshuai.webapi.baseapi.dto.response.RespDTO;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;


/**
 * Created by yubo on 2018/11/19.
 */

@FeignClient(value = "user-service",fallback = UserServiceHystrix.class )
public interface UserServiceClient {

    @PostMapping(value = "/user/{username}")
    RespDTO<UserDto> getUser(@RequestHeader(value = "Authorization") String token, @PathVariable("username") String username);
}



